<template>
  <div class="app">
    <BaseCount :count="count" @changeCount="fn"></BaseCount>
    <!--  -->
    <!-- <button @click="fn">按钮</button> -->
  </div>
</template>

<script>
import BaseCount from './components/BaseCount.vue'
export default {
  components: {
    BaseCount,
  },
  data() {
    return {
      count: 100,
    }
  },
  methods: {
    // 形参可以拿到 子传父 传过来的值
    fn(val) {
      // console.log(val)
      this.count = val
    },
  },
}
</script>

<style>
</style>